/*
 * Created by: vadikv
 * Created: Monday, April 07, 2008
 */

using System;
using System.Collections.Generic;
using OneDayModel.Interfaces;

namespace OneDayModel.PresentationLogic
{
    public interface IExistingUserProfileUI
    {
        event EventHandler<ShowExistingUserProfileArgs> onShowExistingUserProfile;
        void ShowRoles(IEnumerable<string> userRoles);
        void ShowAttributes(IEnumerable<KeyValuePair<string, string>> attributes, bool readOnly);
        void SetAttributesDefinitions(IDictionary<string, IRoleAttribute> allAttributesDefinitions);
    }

    public class ShowExistingUserProfileArgs : EventArgs
    {
        private readonly ISession session;
        private readonly string userAlias;

        public ShowExistingUserProfileArgs(ISession session, string userAlias)
        {
            this.session = session;
            this.userAlias = userAlias;
        }

        public ISession Session
        {
            get { return session; }
        }

        public string UserAlias
        {
            get { return userAlias; }
        }
    }
}